8bc8e1039836628c520e4a12e8d1d8c55dd9b0a2,gdx/src/com/badlogic/gdx/scenes/scene2d/ui/ScrollPane.java,ScrollPane,calculateBoundsAndPositions,#Matrix4#,97
Before Change
// Set the bounds and scroll knob sizes if scrollbars are needed.
if (scrollX) {
hScrollBounds.set(bg.getLeftWidth(), bg.getBottomHeight(), areaWidth, hScrollKnob.getTotalHeight());
hKnobBounds.width = Math.max(hScrollKnob.getTotalWidth(), (int)(hScrollBounds.width * areaWidth / widget.width));
hKnobBounds.height = hScrollKnob.getTotalHeight();
hKnobBounds.x = hScrollBounds.x + (int)((hScrollBounds.width - hKnobBounds.width) * getScrollPercentX());
hKnobBounds.y = hScrollBounds.y;
}
if (scrollY) {
vScrollBounds.set(width - bg.getRightWidth() - vScrollKnob.getTotalWidth(), height - bg.getTopHeight() - areaHeight,
vScrollKnob.getTotalWidth(), areaHeight);
vKnobBounds.width = vScrollKnob.getTotalWidth();
vKnobBounds.height = Math.max(vScrollKnob.getTotalHeight(), (int)(vScrollBounds.height * areaHeight / widget.height));
After Change
float bgLeftWidth = bg == null ? 0 : bg.getLeftWidth();
float bgRightWidth = bg == null ? 0 : bg.getRightWidth();
float bgTopHeight = bg == null ? 0 : bg.getTopHeight();
float bgBottomHeight = bg == null ? 0 : bg.getTopHeight();
// Get available space size by subtracting background's padded area.
float areaWidth = width - bgLeftWidth - bgRightWidth;